<template>
    <h1>当前求和:{{ sum }}</h1>
    <button @click="sum++">+1</button>
    <h2>当前点击坐标:{{ point.x }} ,{{ point.y }}</h2>

</template>

<script>
import useMouse from '../composables/useMouse'

import { ref, onMounted, onUnmounted } from 'vue'
export default {
    name: "Count",
    setup() {
        let sum = ref(0)
        onMounted(() => {
            console.log('count #onMounted')
        })
        onUnmounted(() => {
            console.log('count #onUnmounted')
        })
        let point = useMouse()

        return {
            sum, point
        };
    },

};
</script>

<style></style>